﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Caliburn.PresentationFramework.ApplicationModel;
using Caliburn.Core.Metadata;
using System.Windows;
using Luna.WPF.ApplicationFramework;
using Microsoft.Practices.ServiceLocation;
using Caliburn.PresentationFramework.Filters;
using System.Windows.Interop;
using System.Runtime.InteropServices;
using XWord.GUI.Presenters.Infrastructure;
using XWord.WPF.ApplicationFramework;
namespace Luna.Infrastructure.Presenters
{
    [Singleton("TrayIconPresenter", typeof(TrayIconPresenter))]
    public class TrayIconPresenter : DefaultPresenter
    {

        public void OpenMainWindow()
        {
            Application.Current.OpenMainWindow();
        }

        public void OpenOptionWindow()
        {
            this.OpenDialog<OptionManagerPresenter>();
        }

        //public void About()
        //{
        //    ServiceLocator.Current.GetInstance<IMsgBoxManager>().Show("XWord");
        //}

        //public bool CanCheckUpdate()
        //{
        //    return VersionHelper.CanUpdate;
        //}

        //[Preview("CanCheckUpdate")]
        //public void CheckNewVersion()
        //{
        //    VersionHelper.CheckUpdate();
        //}

        public void ShutDown()
        {
            Application.Current.Shutdown();
        }
    }
}
